package cn.springcloud.fix.uaa.web.vo;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.social.security.SocialUserDetails;

import java.util.Collection;

@Data
public class SocialUser implements SocialUserDetails {

    /**
     * 登录账户
     */
    private String account;

    /**
     * 用户密码
     */
    private String password;

    /**
     * 手机号码
     */
    private String mobile;

    /**
     * 用户名，昵称
     */
    private String nickName;

    /**
     * 用户真实姓名
     */
    private String realName;

    /**
     * 性别：1-男，2-女
     */
    private Integer gender;

    /**
     * 用户头像图片
     */
    private String avatar;

    /**
     * 微信登录openid
     */
    private String openId;

    /**
     * 找回密码问题
     */
    private String question;

    /**
     * 找回密码答案
     */
    private String answer;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 电话号码
     */
    private String phone;

    /**
     * EBL-有效，DEL-无效，LCK-锁定
     */
    private String status;

    @Override
    public String getUserId() {
        return null;
    }

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    @Override
    public String getPassword() {
        return password;
    }

    @Override
    public String getUsername() {
        return account;
    }

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }
}
